package 二级缓存;

/**
 * @author: wh(1835734390 @ qq.com)
 * @date: 2023/8/15 17:00
 * @description:
 * @version:
 */
public class CacheItem {
        private Object value;
        private long expirationTime;

        public CacheItem(Object value, long expirationTime) {
            this.value = value;
            this.expirationTime = expirationTime;
        }

        public Object getValue() {
            return value;
        }

        public long getExpirationTime() {
            return expirationTime;
        }

        public boolean isExpired() {
            return System.currentTimeMillis() > expirationTime;
        }
}
